package com.yunhuakeji.wddx.control;

import java.io.InputStream;

import com.yunhuakeji.wddx.impl.IMMessage;
import com.yunhuakeji.wddx.utils.ResultUtil;

public class MessageController extends ActionTicketSupport
{
	private static final long serialVersionUID = 1L;
	private InputStream inputStream;
	private String callback,n_id,userid,ticket,function_id, pagenum, pageSize;
	
	public MessageController() throws Exception
	{
		super();
	}
	
	public String getNewMessage()
	{
		inputStream = new ResultUtil().resultString(callback, new IMMessage().getNewMessage(this.getUserid(),this.getTicket()));
		return SUCCESS;
	}

	public String signMessage(){
		
		inputStream = new ResultUtil().resultString(new IMMessage().signMessage(this.getUserid(), n_id));
		return SUCCESS;
	}
	

	public String getMessageFunctionList()
	{
		inputStream = new ResultUtil().resultString(callback, new IMMessage().getFunctionList(userid,ticket));
		return SUCCESS;
	}
	
	public String getMessageFunctionDetail()
	{
		inputStream = new ResultUtil().resultString(callback, new IMMessage().getFunctionDetail(userid, function_id, pagenum, pageSize,ticket));
		return SUCCESS;
	}
	
	public InputStream getInputStream()
	{
		return inputStream;
	}

	public void setInputStream(InputStream inputStream)
	{
		this.inputStream = inputStream;
	}

	public String getCallback()
	{
		return callback;
	}

	public void setCallback(String callback)
	{
		this.callback = callback;
	}


	public String getN_id() {
		return n_id;
	}

	public void setN_id(String n_id) {
		this.n_id = n_id;
	}

	public String getUserid()
	{
		return userid;
	}

	public void setUserid(String userid)
	{
		this.userid = userid;
	}

	public String getTicket()
	{
		return ticket;
	}

	public void setTicket(String ticket)
	{
		this.ticket = ticket;
	}

	public String getFunction_id()
	{
		return function_id;
	}

	public void setFunction_id(String function_id)
	{
		this.function_id = function_id;
	}

	public String getPagenum()
	{
		return pagenum;
	}

	public void setPagenum(String pagenum)
	{
		this.pagenum = pagenum;
	}

	public String getPageSize()
	{
		return pageSize;
	}

	public void setPageSize(String pageSize)
	{
		this.pageSize = pageSize;
	}
	
	
}
